In Virtual Machines (VMs) (e.g., Java Virtual Machines) automatic garbage collection is the process of looking at heap memory to automatically reclaim memory for reuse. The heap memory is scanned and pieces of memory that are in use are marked. The remaining unused memory is reclaimed. Garbage collection allows developers to create new objects without worrying explicitly about memory allocation and deallocation.
Performing garbage collection causes operation of application threads to stop until the garbage collection is completed. As more objects are allocated to the memory heap, the time to perform garbage collection increases. Most data objects are short lived so focusing garbage collection on these data objects can reduce latency. The memory heap is divided into a new generation and an old generation. Data objects are initially allocated to the new generation and eventually moved to the old generation if they survive for a threshold period of time. Garbage collection can be performed on the new generation to target short lived data objects without scanning the entirety of the memory heap.
Administrators can adjust configuration settings in attempts to modify performance of the garbage collection to their specific needs. Existing solutions, however, largely exist in the form of various “diagnostic suites” that only provide general guidance to remove problems. Accordingly, existing solutions do not have the capability to implement specified behaviors, implement configurations, or directly improve a running VM.
It is within this context that the present disclosure arises.